# Contributor: Newbyte <newbie13xd@gmail.com>
# Maintainer: Newbyte <newbie13xd@gmail.com>
pkgname=blueprint-compiler
pkgver=0.14.0
pkgrel=0
pkgdesc="Markup language for GTK user interfaces"
url="https://jwestman.pages.gitlab.gnome.org/blueprint-compiler"
arch="noarch"
license="LGPL-3.0-or-later"
depends="
	gobject-introspection-dev
	gtk4.0
	libadwaita
	python3
	py3-gobject3
	"
depends_dev="$pkgname=$pkgver-r$pkgrel"
makedepends="meson"
checkdepends="cage-run"
subpackages="$pkgname-dev $pkgname-pyc"
source="https://gitlab.gnome.org/jwestman/blueprint-compiler/-/archive/v$pkgver/blueprint-compiler-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson . output
	meson compile -C output
}

check() {
	# Skip failed test deprecations
	# https://gitlab.gnome.org/jwestman/blueprint-compiler/-/issues/178
	rm -r "$builddir"/tests/sample_errors/deprecations.*

	cage-run meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
	python3 -m compileall -fq "$pkgdir"/usr/lib/python*
}

sha512sums="
8c96e091d4cf334e017c65454a247a59ca362af1e7695ae15d8a929aac45f4344c9344a2c72e95f733b864a1ec1eac1072aba3185563c3755c1c9b60edfd86a9  blueprint-compiler-v0.14.0.tar.gz
"
